<%@ page language="java" pageEncoding="utf-8" import="java.util.ArrayList,com.entity.GoodsInfo,com.entity.CustomerInfo,com.entity.CustomerDetailInfo,java.text.DecimalFormat" %>
<%@page import="com.util.PublicToolCheckParam" %>
<%@page import="com.util.PublicToolGetGoodsTypeName" %>


<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<%
    String email = (String) session.getAttribute("email");
    String thirdemail = (String) session.getAttribute("thirdemail");
%>


<%
    CustomerInfo customerInfo = (CustomerInfo) request.getAttribute("customerInfoList");
    CustomerDetailInfo customerDetailInfo = (CustomerDetailInfo) request.getAttribute("customerDetailInfoList");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<base href="<%=basePath%>">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=7">
    <title>信息确认</title>
    <meta content="" name="keywords">
    <meta content="" name="description">
    <link href="css/common.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="./js/base.js"></script>
    <script type="text/javascript" src="js/menu.js"></script>
    <script type="text/javascript" src="js/time.js"></script>
    <script type="text/javascript" src="js/lb.js"></script>

        	<script type="text/javascript" src="js/web/confirmSendInfo.js" charset="utf-8"></script>

    <script type="text/javascript" src="js/web/sendInfo.js" charset="utf-8"></script>
    <script type="text/javascript">
        function checkLogin() {
            if ("<%=email%>" == "" || "<%=email%>" == "null") {
                alert("请先登陆!");
                return false;
            }
            else {
                top.location.href = "servlet/DoMethod?method=showMyInformation";
                return true;
            }
        }
        function checkUserLogin() {
            if ("<%=email%>" == "" || "<%=email%>" == "null") {
                alert("请先登陆!");
                return false;
            }
            else {
                top.location.href = "servlet/DoChatMethod?method=login";
                return true;
            }
        }
    </script>

    <!---reload-!-->
</head>
<body style="background:transparent url(images/bg.jpg) repeat scroll 0% 0%" onload="times()">
<div id="contain">

    <!-- 头 -->

    <jsp:include page="../web/top.jsp" flush="true"/>


    <!-- 头 -->


    <!-- 第二部分内容 -->
    <div class="box" style=" margin-top:1px;   background: url(images/pbg.gif);">

        <div class="">
            <div class="boxtitlebg mbnav"><a href="">首页</a> &gt; 信息确认</div>

            <!--内容-->
            <div style="padding:10px">


                <table width='960px' align="center">
                    <tr>
                        <td><font color="#666666"><strong>就诊确认表</strong></font></td>
                    </tr>
                </table>
                <table height="220" cellpadding="0" cellspacing="0" bordercolor="#999999" border="1" style="border:1px; font-size:13px;" width='960px' align="center">
                    <tr>
                        <td height="32" bgcolor="#cccccc">
                            <img src="../image/icon/item.gif" width="12" height="12"/><strong>患者信息</strong></td>
                    </tr>
                    <tr>
                        <td>
                            <div align="center">
                                <table width="895" height="140" cellpadding="0" cellspacing="0" bordercolor="#cccccc" border="1">
                                    <tr>
                                        <td width="112"><font color="#666666">患者编号</font></td>
                                        <td width="350"><font color="#666666"><%=customerInfo.getId()%>
                                        </font></td>
                                        <td width="83"><font color="#666666">注册时间</font></td>
                                        <td width="340"><font color="#666666"><%=customerInfo.getRegisterTime()%>
                                        </font></td>
                                    </tr>
                                    <tr>
                                        <td><font color="#666666">患者帐号/邮箱</font></td>
                                        <td><font color="#666666"><%=customerInfo.getEmail()%>
                                        </font></td>
                                        <td><font color="#666666">患者姓名</font></td>
                                        <td><font color="#666666"><%=customerDetailInfo.getName()%>
                                        </font></td>
                                    </tr>
                                    <tr>
                                        <td><font color="#666666">移动电话</font></td>
                                        <td><font color="#666666">
                                            <%
                                                if (customerDetailInfo.getMovePhone() != null) {
                                                    out.println(customerDetailInfo.getMovePhone());
                                                } else {
                                                    out.println("无");
                                                }
                                            %>
                                        </font></td>
                                    </tr>
                                    <tr>
                                        <td><font color="#666666">联系地址</font></td>
                                        <td colspan="3"><font color="#666666"><%=customerDetailInfo.getAddress()%>
                                        </font></td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                </table>
                <br/>
                <table height="200" cellpadding="0" cellspacing="0" bordercolor="#999999" border="1" style="border:1px;font-size:13px;" width='960px' align="center">
                    <tr>
                        <td height="32" bgcolor="#cccccc">
                            <img src="../image/icon/item.gif" width="12" height="12"/><strong>就诊信息</strong></td>
                    </tr>
                    <tr>
                        <td colspan="7" height="25" style="border-bottom: none;"></td>
                    </tr>
                    <tr>
                        <td style="border-top: none;border-bottom: none">
                            <div align="center">
                                <table width="895" height="160" cellpadding="0" cellspacing="0" bordercolor="#cccccc" border="1">
                                    <tr>
                                        <td width="58" height="30"><font color="#666666">编号</font></td>
                                        <td colspan="2"><font color="#666666">就诊名称</font></td>
                                          <td width="95"><font color="#666666">挂号费用</font></td>
                                     </tr>

                                    <%
                                        DecimalFormat df = new DecimalFormat("0.00");
                                        float sumFee = 0;
                                        ArrayList<GoodsInfo> shopList = (ArrayList<GoodsInfo>) session.getAttribute("shopList");
                                        for (int i = 0; i < shopList.size(); i++) {
                                            GoodsInfo gd = shopList.get(i);
                                            sumFee += gd.getCount() * gd.getDiscountPrice();
                                            String prePrice = df.format(gd.getPrice());

                                            out.println("<tr>");
                                            out.println("<td><font color='#666666'>" + gd.getGoodsId() + "</font></td>");
                                            if (PublicToolCheckParam.checkNullAndEmpty(gd.getPhoto())) {
                                                out.println("<td width='87' style='border-right:none'><img src='" + gd.getPhoto() + "' width='60' height='60' /></td>");
                                            } else {
                                                out.println("<td width='87' height='60' style='border-right:none'><div align='center'><font color='#FF6699' size='2'>图片暂无</font></div></td>");
                                            }
                                            out.println("<td width='276' style='border-left:none'><div align='left'><font color='#666666'>" + gd.getGoodsName() + "</font></div></td>");
                                             out.println("<td><font color='#666666'>" + prePrice + "</font></td>");
                                            out.println("</tr>");
                                        }
                                         
                                    %>

                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="7" height="25" style="border-top: none;"></td>
                    </tr>
                </table>
                <br/>
                <table height="35" border="0" cellpadding="0" cellspacing="0" width='960px' align="center">
                    <tr>
                        <td>
                            <input type="button" value="确认就诊" onclick="submitConfirmSendInfo()" style="width:80px; height:30px;padding-top: 3px"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="button" value="返  回" onclick="javaScript:history.go(-1);" style="width:80px; height:30px;padding-top: 3px"/>
                        </td>
                    </tr>
                </table>
                <br/>
            </div>
            <!--内容-->
        </div>
    </div>
    <!-- 第二部分内容 -->

    <!--底部-->

    <jsp:include page="../web/bottom.jsp" flush="true"/>
</div>
</body>
</html>






